/*
 * @Author: gyc
 * @Date: 2020-06-11 15:50:10
 * @LastEditTime: 2020-07-18 10:15:11
 * @Description: Nuxt测试版
 */

const Service = require('egg').Service;
class ImgService extends Service {
    async findSwiperImg(module) {
        const imgList = await this.app.mysql.query("select * from yui_img_info where imgModule='" + module + "'")
        return imgList;
    }
    async findVedioImg() {
        const vedioImgList = await this.app.mysql.select('yui_index_vedio', {
            where: {
                status: "1"
            },
            limit: 6
        })
        return vedioImgList;
    }
    async findHotImg() {
        const vedioImgList = await this.app.mysql.select('yui_index_vedio', {
            where: {
                status: "2"
            },
            limit: 1
        })
        return vedioImgList;
    }
}

module.exports = ImgService;